package com.zsl.swing.redis.desktop.window.builder;

import javax.swing.*;
import java.awt.*;

public class FontNameComboBoxBuilder {

    private static final GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();

    private FontNameComboBoxBuilder(){}

    public static JComboBox<String> getInstance(){
        String[] fontNames = localGraphicsEnvironment.getAvailableFontFamilyNames();
        return new JComboBox<>(fontNames);
    }
}
